package ar.com.temporis.scrum.model;

import java.util.Collection;
import java.util.Date;

import ar.com.temporis.framework.domain.Entity;
import ar.com.temporis.system.domain.NamedObject;


/**
 * The sprint backlog is the list of tasks that the Scrum team is committing
 * that they will complete in the current sprint.
 * 
 * @author matias.sulik
 * 
 */
public class SprintBacklog extends Entity implements NamedObject {

	private String name;
	private BacklogItem backlogItem;

	private Date fromDate;
	private Date toDate;

	private Collection<Task> tasks;

	public Collection<Task> getTasks() {
		return tasks;
	}

	public void setTasks(Collection<Task> tasks) {
		this.tasks = tasks;
	}

	public SprintBacklog add(Task task) {
		this.tasks.add(task);
		return this;
	}

	public void setBacklogItem(BacklogItem backlogItem) {
		this.backlogItem = backlogItem;
	}

	public BacklogItem getBacklogItem() {
		return backlogItem;
	}

	public Date getFromDate() {
		return fromDate;
	}

	public void setFromDate(Date from) {
		this.fromDate = from;
	}

	public Date getToDate() {
		return toDate;
	}

	public void setToDate(Date to) {
		this.toDate = to;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
